//
//  TXYResponse.m
//  FunnyVideo
//
//  Created by 李鑫 on 15/8/28.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//

#import "TXYResponse.h"

@implementation TXYResponse

/**
 *  创建一个TXYResponse对象
 *
 *  @param code     返回的结果码
 *  @param httpcode HTTP状态码
 *  @param msg      响应消息
 *  @param data     返回的数据
 *
 *  @return         TXYResponse对象
 */
+ (TXYResponse *)createResponseWith:(NSUInteger)code httpCode:(NSUInteger)httpcode message:(NSString *)msg data:(NSDictionary *)data{
    TXYResponse *resp = [[TXYResponse alloc] init];
    
    [resp setCode:code];
    
    [resp setHttpcode:httpcode];
    
    [resp setMessage:msg];
    
    resp.data = [[TXYResponseData alloc] initWithDictionary:data];
    
    return resp;
}

- (TXYResponseData *)getRespData{
    
    return self.data;
}
@end
